//
//  LRDatabaseManager.h
//  Anyair
//
//  Created by karlcool on 14-5-25.
//  Copyright (c) 2014年 Karlcool. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "FMDatabase.h"
#import "FMDatabaseQueue.h"
#import "FMDatabaseAdditions.h"

@interface LRDatabaseManager : NSObject

+(LRDatabaseManager *)createDatabase;
@property(strong,nonatomic)FMDatabase *database;
@property(strong,nonatomic)FMDatabaseQueue *dataQueue;
//获取数据库中未上传的数据
- (NSMutableArray*)getUpdateArray;
//上传成功清除数据
- (void)deleteUpdateModelByUpdateId:(int)updateId;
//上传失败做标记下次再上传一次，再失败就清除
- (void)setUpdateModelFailByUpdateId:(int)updateId;
//获取对应电话和类型的历史数据
- (NSMutableArray*)getHistoryArrayByPhone:(NSString*)phone AndType:(int)type;
@end
